All Questions
9 questions
2votes
0answers
131views
Sequential writing and reading (two threads)
I am new to Java. My task is to create a SequentalWriter class and a SequentalReader class that implement the Runnable interface....
1vote
1answer
617views
Multithreaded arithmetic quiz with 20-second time limit
I learned something about threads and I tried to use them in an programming exercise. The user of the program has to solve as many exercises as he can within twenty seconds. After that time the ...
2votes
2answers
1kviews
Concurrent hero vs monster program
I have made a simple concurrent program. It represents a battle between a hero and a monster. I am beginner in concurrency so I just want to hear your opinion. What are bad and good sides of my code ...
6votes
2answers
4kviews
Multithreaded webcrawler
I've been trying to learn Java for the last day or two. This is the first project I am working on, so please bear with me. I worked on a multithreaded web crawler. It is fairly simple but I'd like to ...
3votes
1answer
527views
Thread class for exercises
I just felt a sting as for the first time, I copy-pasted code blocks, and made very little change to it, to overload it. It works fine, but I have 3 constructors that are basically copy-pasted. I'm ...
0votes
1answer
740views
Java MultiThreading using wait and notify - follow-up
After following the tips from @VoiceOfUnreason on my previous question, I want to post the revised code. The purpose of the code is to simulate a Shop and a ...
2votes
1answer
163views
Java MultiThreading .wait() .notify()
I have been working on a long project trying to understand the basics of multi-threading. The application is supposed to simulate a Shop and a Customer which share a Box and a PayPal account. Main....
3votes
2answers
2kviews
Simple Java Game including Thread
I am a Java beginner and have made a simple Compare Game. It has done well but I am not sure about my solution, especially about my thread. Can you give some advice on making it better? ...
5votes
3answers
667views
Multiple background tasks
This is taken from my post at Stack Overflow here. I need your help to review my code for improvement and best practice. ...